
#ifndef _MetaDataItem_H_
#define _MetaDataItem_H_

#include "DataxApi.hpp"
#include "../OLCore/AbstractDataItem.hpp"
#include "../OLApp/defines.hpp"
#include <vtkUnstructuredGrid.h>
#include <vtkDataSetMapper.h>
#include <vtkBillboardTextActor3D.h>
#include <vtkAssembly.h>
#include <vtkActor.h>


namespace NSDatax {

	class DATAXAPI MetaDataItem :
		public NSCore::AbstractDataItem
	{
		//Q_OBJECT
	public:
		MetaDataItem(QTreeWidgetItem* view);
		MetaDataItem(QTreeWidget* tree);
		MetaDataItem();
		~MetaDataItem() override;
	public:
		/*get*/
	
		/*Set*/

		/*Other*/

	public:
		virtual inline QString className() override { return "MetaDataItem"; };
		void getPropertyTree(QTreeWidget* p_tree) override;
		Sp(vtkBillboardTextActor3D) getDisplayLabel() { return m_meta_label; };
		Sp(vtkAssembly) getROGeometry() { return m_assembly; };

		void setMetaInput(Sp(vtkUnstructuredGrid) ugrid);
		void setDisplay(QString display, double* postion = nullptr);
	protected:
		void init();

	private:
		QString m_display{ "object" };
		Sp(vtkActor) m_actor {};
		Sp(vtkAssembly) m_assembly {};
		Sp(vtkUnstructuredGrid) m_polydata {};
		Sp(vtkDataSetMapper) m_polydata_mapper {};
		Sp(vtkBillboardTextActor3D) m_meta_label {};
		/*color*/
		double m_label_color[3]{ 1.0,0,0 };
		double m_meta_color[3]{ 1.0,0,0 };
		/*line*/
		double m_linewidth{ 2.5 };
		/*point*/
		double m_pointsize{ 8 };

	};

}



#endif

